import 'package:flutter/material.dart';
import 'package:local_coffee/components/c_appbar/custom_appbar.dart';
import 'package:local_coffee/components/c_button/index.dart';
import 'package:local_coffee/components/hex.dart';
import 'package:local_coffee/components/icon.dart';
import 'package:local_coffee/components/rgba.dart';
import 'package:local_coffee/utils/global.dart';

class OrderEvaluation extends StatefulWidget {
  
  OrderEvaluation({
    Key key
  }) : super(key: key);

  _OrderEvaluationState createState() => _OrderEvaluationState();
}

class _OrderEvaluationState extends State<OrderEvaluation> {
  
  // 获取屏幕的底部距离
  double bottom = G.screenPadding().bottom;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: HEX.hexfff,
      appBar: customAppBar(
        title: '评价',
        context: context
      ),
      body: Container(
        color: RGBA.rgbaf8f8f8,
        child: Stack(
          children: <Widget>[
            Container(
              child: Column(
                children: <Widget>[
                  Container(
                    padding: EdgeInsets.only(top: 25),
                    color: RGBA.rgbaffffff1,
                    child: Column(
                      children: <Widget>[
                        Row(
                          mainAxisAlignment: MainAxisAlignment.center,
                          children: <Widget>[
                            Text(
                              '`满意`',
                              style: TextStyle(
                                color: RGBA.rgba383838,
                                fontSize: 18
                              ),
                            )
                          ],
                        ),
                        Container(
                          margin: EdgeInsets.only(top: 20),
                          child: Row(
                            mainAxisAlignment: MainAxisAlignment.center,
                            children: <Widget>[
                              Row(
                                children: <Widget>[
                                  Container(
                                    margin: EdgeInsets.only(right: 15),
                                    child: icon0xe620(
                                      color: RGBA.rgbaf4ec2c,
                                      size: 40
                                    ),
                                  ),
                                  Container(
                                    margin: EdgeInsets.only(left: 15),
                                    child: icon0xe61f(
                                      color: RGBA.rgbabcbcbc,
                                      size: 40
                                    ),
                                  )
                                ],
                              )
                            ],
                          ),
                        ),
                        // 输入框
                        Container(
                          margin: EdgeInsets.only(top: 30, bottom: 20),
                          padding: EdgeInsets.symmetric(horizontal: 15),
                          child: Row(
                            children: <Widget>[
                              Expanded(
                                child: TextField(
                                  maxLength: 5,
                                  keyboardType: TextInputType.multiline,
                                  decoration: InputDecoration(
                                    filled: true,
                                    focusColor: RGBA.rgbaf8f8f8,
                                    counterText: '',
                                    border: OutlineInputBorder(
                                      borderSide: BorderSide.none,
                                      borderRadius: BorderRadius.all(Radius.circular(4.0))
                                    ),
                                    contentPadding: EdgeInsets.all(10),
                                    hintText: '请输入评价内容（可不填）',
                                    hintStyle: TextStyle(
                                      color: RGBA.rgbaa6a6a6,
                                      fontSize: 14
                                    ),
                                    fillColor: RGBA.rgbaf8f8f8
                                  ),
                                ),
                              )
                            ],
                          ),
                        )
                      ],
                    ),
                  ),
                  Positioned(
                    left: 0,
                    bottom: 0,
                    child: Container(
                      width: G.screenWidth(),
                      padding: EdgeInsets.only(bottom: bottom, top: bottom / 2),
                      color: HEX.hexfff,
                      alignment: Alignment.center,
                      child: CButton.normal(
                        width: 300,
                        child: Text('提交'),
                        bgColor: RGBA.rgba94c4ec,
                        color: HEX.hexfff,
                        onPressed: () => {}
                      ),
                    ),
                  )
                ],
              ),
            )
          ],
        ),
      ),
    );
  }
}